import { createRouter, createWebHistory } from 'vue-router'
import AppMain from '@/views/AppMain/index.vue'
import AppCategory from '@/views/AppCategory/index.vue'
import AppCart from '@/views/AppCart/index.vue'
import AppMine from '@/views/AppMine/index.vue'
import NotFound from '@/views/NotFound/index.vue'
import AppSearsh from '@/views/AppSearsh/index.vue'
import AppList from '@/views/AppList/index.vue'
import AppDetail from '@/views/AppDetail/index.vue'
import AppLogin from '@/views/AppLogin/index.vue'
import AppRegisterOne from '@/views/AppRegister/RegisterOne.vue'
import AppRegisterTwo from '@/views/AppRegister/RegisterTwo.vue'
import AppRegisterThree from '@/views/AppRegister/RegisterThree.vue'
import FCode from '@/views/AppMine/FCode/index.vue'
import AppMineAdress from '@/views/AppMine/AppMineAdress/index.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path:'/',redirect:'/main'},
    {path:'/main',name:'main',component:AppMain},
    {path:'/category',name:'category',component:AppCategory},
    {path:'/cart',name:'cart',component:AppCart},
    {path:'/mine',name:'mine',component:AppMine},
    {path:'/fcode',name:'fcode',component:FCode,meta:{hideFooter:true}},
    {path:'/adress',name:'adress',component:AppMineAdress,meta:{hideFooter:true}},
    {path:'/notfound',name:'notfound',component: NotFound,meta:{hideFooter:true}},
    {path:'/:pathMatch(.*)*',redirect:'/notfound'},
    {path:'/searsh',name:'searsh',component:AppSearsh,meta:{hideFooter:true}},
    {path:'/list',name:'list',component:AppList,meta:{hideFooter:true}},
    {path:'/detail/:proid',name:'detail',component:AppDetail,meta:{hideFooter:true}},
    {path:'/login',name:'login',component:AppLogin,meta:{hideFooter:true}},
    {path:'/registerone',name:'registerone',component:AppRegisterOne,meta:{hideFooter:true}},
    {path:'/registertwo',name:'registertwo',component:AppRegisterTwo,meta:{hideFooter:true}},
    {path:'/registerthree',name:'registerthree',component:AppRegisterThree,meta:{hideFooter:true}},
  ]
})

export default router
